页面自定跳转超链接跳转jsp页面跳转 您所在的位置:网站首页 tableau 超链接 跳转 页面自定跳转超链接跳转jsp页面跳转

页面自定跳转超链接跳转jsp页面跳转

2022-05-30 16:34| 来源: 网络整理| 查看: 265

一些页面自动跳转的实现2009-05-10 来自:lizhe1985  [收藏到我的网摘]来源:http://www.blogjava.net/xcp/archive/2009/03/05/outerscript.html

功能:5秒后,自动跳转到同目录下的02view.html文件

1)html的实现<head><meta http-equiv="refresh" content="5; url=02view.html"></head>优点:简单缺点:Struts Tiles中无法使用

2)javascript的实现<script language="javascript" type="text/javascript">setTimeout("javascript:location.href='02view.html'", 5000); </script>优点:灵活,可以结合更多的其他功能缺点:受到不同浏览器的影响

3)结合了倒数的javascript实现(IE)<span id="totalSecond">5</span>

<script language="javascript" type="text/javascript">var second = totalSecond.innerText; setInterval("redirect()", 1000); function redirect(){ totalSecond.innerText=--second; if(second<0) location.href='02view.html'; }



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有